//
//  ChargeQQRequest.m
//  EasyToo
//
//  Created by YuanDee on 13-10-14.
//
//

#import "ChargeQQRequest.h"

@implementation ChargeQQRequest
-(id) initWithCardId:(NSString *)cardId andQQNum:(NSString *)QQNum andCardNum:(NSString *)cardNum Delegate:(id<ServerCommunicationDelegate>)delegate
{
    self = [super init];
    if(self)
    {
        self.requestName = @"ChargeQQRequest";
        self.delegate = delegate;
        self.url = PROTOCOL_ORDER_URL;
        
        [self.bodyJsonDict setObject:QQNum forKey:@"game_userid" ];
        [self.bodyJsonDict setObject:@"220612" forKey:@"cardid"];
        [self.bodyJsonDict setObject:cardNum  forKey:@"cardnum"];
        [self.bodyJsonDict setObject:@"" forKey:@"game_srv"];
        [self.bodyJsonDict setObject:@"4.0" forKey:@"version"];
        [self.bodyJsonDict setObject:@"" forKey:@"game_area"];
        
        [self.headerJsonDict setObject:@"220612"forKey:@"TranCode"];
        NSInteger price = [cardNum integerValue];
        price = price*100;
        cardNum = [NSString stringWithFormat:@"%d", price];
        [self.headerJsonDict setObject:cardNum forKey:@"TxAmt"];
        
        [self buildJsonRequest];
    }
    return self;
}

-(void)dealloc
{
    [super dealloc];
}

@end
